package com.bigfire.dtm.domain.ability.aggregate;

public class Programmer {
    private long id;
    private String name;

    //工作情况
    private double doneTaskNum;
    private double doneTaskTime;
    private double receiveTaskNum;
    private double delayTaskNum;
    private double delayTaskTime;
    private double bugNum;
    private double bugTime;
    private double fee = 18000;
    private int level = 6;
    private double realTime;
    private double effectTime;
    private double capacity;
    private double coach = 0;
    private double tech = 0;
    private double train = 0;

    public Programmer(double doneTaskNum, double doneTaskTime, double receiveTaskNum, double delayTaskNum, double delayTaskTime, double bugNum, double bugTime, double fee, int level, double realTime, double effectTime, double coach, double tech, double train) {
        this.doneTaskNum = doneTaskNum;
        this.doneTaskTime = doneTaskTime;
        this.receiveTaskNum = receiveTaskNum;
        this.delayTaskNum = delayTaskNum;
        this.delayTaskTime = delayTaskTime;
        this.bugNum = bugNum;
        this.bugTime = bugTime;
        this.fee = fee;
        this.level = level;
        this.realTime = realTime;
        this.effectTime = effectTime;
        this.capacity = getParamByLevel(level) * normalCapacity;
        this.coach = coach;
        this.tech = tech;
        this.train = train;
    }


    public double getDoneTaskNum() {
        return doneTaskNum;
    }

    public void setDoneTaskNum(double doneTaskNum) {
        this.doneTaskNum = doneTaskNum;
    }

    public double getDoneTaskTime() {
        return doneTaskTime;
    }

    public void setDoneTaskTime(double doneTaskTime) {
        this.doneTaskTime = doneTaskTime;
    }

    public double getReceiveTaskNum() {
        return receiveTaskNum;
    }

    public void setReceiveTaskNum(double receiveTaskNum) {
        this.receiveTaskNum = receiveTaskNum;
    }

    public double getDelayTaskNum() {
        return delayTaskNum;
    }

    public void setDelayTaskNum(double delayTaskNum) {
        this.delayTaskNum = delayTaskNum;
    }

    public double getDelayTaskTime() {
        return delayTaskTime;
    }

    public void setDelayTaskTime(double delayTaskTime) {
        this.delayTaskTime = delayTaskTime;
    }

    public double getBugNum() {
        return bugNum;
    }

    public void setBugNum(double bugNum) {
        this.bugNum = bugNum;
    }

    public double getBugTime() {
        return bugTime;
    }

    public void setBugTime(double bugTime) {
        this.bugTime = bugTime;
    }

    public double getRealTime() {
        return realTime;
    }

    public void setRealTime(double realTime) {
        this.realTime = realTime;
    }

    public double getEffectTime() {
        return effectTime;
    }

    public void setEffectTime(double effectTime) {
        this.effectTime = effectTime;
    }

    public static double normalCapacity = 1;

    public double getCapacity() {
        return capacity;
    }

    public void setCapacity(double capacity) {
        this.capacity = capacity;
    }

    public double getFee() {
        return fee;
    }

    public void setFee(double fee) {
        this.fee = fee;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public double getCoach() {
        return coach;
    }

    public void setCoach(double coach) {
        this.coach = coach;
    }

    public double getTech() {
        return tech;
    }

    public void setTech(double tech) {
        this.tech = tech;
    }

    public double getTrain() {
        return train;
    }

    public void setTrain(double train) {
        this.train = train;
    }

    //标准人天系数
    private double l4Param = 0.6;
    private double l5Param = 0.8;
    private double l6Param = 1;
    private double l7Param = 1.25;
    private double l8Param = 1.5;
    private double l9Param = 2;
    private double l10Param = 2.5;

    public double getParamByLevel(int l) {
        switch (l) {
            case 4:
                return l4Param;
            case 5:
                return l5Param;
            case 6:
                return l6Param;
            case 7:
                return l7Param;
            case 8:
                return l8Param;
            case 9:
                return l9Param;
            case 10:
                return l10Param;
            default:
                return 1;
        }
    }

}
